<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    
    // 3.封装一个函数实现，斐波那契数列 1  1  2  3  5  8  13  21 34  55 89
    function fun(length,m,n){
        let arr = [m,n]
        for(let i = 0;i<length;i++){
            let temp = arr[arr.length-1]+arr[arr.length-2]
            arr.push(temp)
        }
        console.log(arr);
    }
    fun(10,1,1)
</script>